<?php
/**
 * CreateTime: 2023/1/9 11:48
 */

namespace App\Http\Requests\MeClient;

use App\Http\Requests\BaseRequests;

class MeClientAddRequest extends BaseRequests
{

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'client_name' => "required",
            'client_type' => "required",
            'client_code' =>"required|max:10",
        ];
    }

    public function messages()
    {
        return [
            'client_name.required' => "委托方姓名不能为空",
            'client_type.required' => "委托方类型不能为空",
            'client_code.required' => "委托方代码不能为空",
            'client_code.max' => "委托方代码不能超过10位",
        ];
    }

}